import { Get, Inject, Provide } from '@midwayjs/decorator';
import {
  CoolController,
  BaseController,
} from '@cool-midway/core';
import { BusinessStatisticsService } from '../../service/statistics';

/**
 * 统计
 */
@Provide()
@CoolController()
export class BusinessAppStatisticsController extends BaseController {
  @Inject()
  businessStatisticsService: BusinessStatisticsService;

  /**
   * 获取首页统计数据
   */
  @Get('/base', { summary: '获取统计数据' })
  async getBase() {
    const result = await this.businessStatisticsService.getBase();
    return this.ok(result);
  }
}
